package com.example.demomongodb.controller;

import com.example.demomongodb.service.WelcomService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version 1.0.0
 * @className: TestController
 * @description:
 * @author: zhangjunfa
 * @date: 2022/11/8 11:31
 */
@RestController
@RequestMapping("/welcome")
@Slf4j
public class TestController {
    @Autowired
    private WelcomService welcomService;

    @GetMapping("/getTest")
    public Object getTest(){
        return welcomService.getOne();
    }

}
